gdksurface-wayland: Fix contradictory assert
authorKritphong Mongkhonvanit <kritphong@mongkhonvanit.tk>
Mon, 17 Jan 2022 06:33:46 +0000 (01:33 -0500)
committerKritphong Mongkhonvanit <kritphong@mongkhonvanit.tk>
Mon, 17 Jan 2022 08:50:08 +0000 (15:50 +0700)
commit55016ada9239a9413938cccafe145710ee38f3c4
tree9fa64014babe5e4c1f0875fc5e70136c9be7bb75
parent3bfaaab4f75b2fabad262d2f689badb27f760119
gdksurface-wayland: Fix contradictory assert

gdk_wayland_toplevel_inhibit_idle() contained a contradictory assert
that always fail. More specifically, in the branch that is supposed to
create the idle inhibitor, there is an assertion that it must already
exist and that the refcount must be greater than zero. This causes a
crash on WMs/DEs that use the ZWP idle inhibit manager protocol such as
KDE Plasma and Sway. Fix this by just asserting that the refcount is
zero instead.
gdk/wayland/gdksurface-wayland.c